﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MWRCommunicationLibrary.ARS408
{
    public class In_CollDetCfg : MWRData
    {
        public override int DefaultCanID
        {
            get
            {
                return 0x400;
            }
        }

        public override int Length
        {
            get
            {
                return 2;
            }
        }

        /// <summary>
        /// Reset currently active warnings of all regions 
        /// (CollDetRegState_WarningLevel) if true
        /// </summary>
        [ParamDecodor(0, 1)]
        public bool WarningReset { get; set; }

        /// <summary>
        /// De-/activate collision detection function
        /// </summary>
        [ParamDecodor(1, 1)]
        public bool Activation { get; set; }

        /// <summary>
        /// Allow change of time parameter if true
        /// </summary>
        [ParamDecodor(3, 1)]
        public bool MinTime_valid { get; set; }

        /// <summary>
        /// Clear all region configurations (set all to inactive) if true
        /// </summary>
        [ParamDecodor(7, 1)]
        public bool ClearRegions { get; set; }

        /// <summary>
        /// Minimum time an object needs to be detected inside the 
        /// region before a warning is triggered
        /// </summary>
        [ParamDecodor(8, 8, 0.1, 0)]
        public double MinTime { get; set; }
    }
}
